<?php 
	require_once('inc_admin.php');
	connect();
	$id=$_GET['id'];
	$sql="select * from videos where vid={$id}";
	$result=mysql_query($sql) or die('查询失败！'.mysql_error());
	$row=mysql_fetch_assoc($result);
	$videoname=$row['videoname'];
	$tid=$row['tid'];
	$uploaddate=$row['uploaddate'];
	$pic=videoPhotoPath.$row['pic'];
// 将查询结果显示在表单中
		 ?>
		 <form method="post" action="videoUpdate.php" enctype="multipart/form-data" class="form-horizontal" >
		 <!-- <table align="center" border="1" width=500> -->
		 <div class="container-fluid col-md-10">
		 		<h3 class="text-center">修改视频信息</h3>
		 	
		 		
		 	<input type="hidden" name="id" value=<?php echo $id; ?>>
		 	
		<div class="form-group">
		<label for="videoname" class="col-md-2 control-label">视频名称</label>
		<div class="col-md-10">
		<input type="text" id="username" name="videoname" class="form-control"
		    value=<?php echo $videoname; ?>>
    </div>
	</div>
	
	<div class="form-group">
		<label for="" class="col-md-2 control-label">类别</label>
		<div class="col-md-10">
		<input type="text" id="tid" name="tid" class="form-control"
		    value=<?php echo $tid; ?>>
    </div>
	</div>
	
		 	
		
	<div class="form-group">
		<label for="" class="col-md-2 control-label">上传时间</label>
		<div class="col-md-10">
		<input type="date"name="uploaddate" class="form-control"value=<?php  echo $uploaddate;  ?>>
	</div>
	</div>
	
	<div class="form-group">
	<label  class="col-md-2 control-label">海报</label>
	<div class="col-md-10">
		<input type="file" name="pic" >
		原海报:<img src="../images/<?php echo $row["pic"]; ?>"width="80px" height="80px" class="img-circle"value=<?php  echo $pic;  ?>>
	</div>
	</div>
	<div class="form-group">
	<div class="col-sm-offset-2 col-sm-10">
		<input type="submit" class="btn btn-default" value="修改">
		<input type="reset" class="btn btn-default" value="重置">
	</div>
	</div>
	</form>
	</div>